package Merlion.FRM.bean;

import Merlion.util.state.CreditProfileState;
import java.util.List;
import javax.ejb.Remote;

@Remote
public interface CreditProfileBeanRemote {

    public Long getCreditProfileId(Long customerId);

    public Long createCreditProfile(Long customerId, String customerGrade, Double creditLimit, Double creditBalance, Double balancePayable, Double paymentInAdvance, List<String> methodOfPayment, String bankName, String accNumber, String creditCardType, String creditCardNumber) throws javax.persistence.NoResultException;

    public void editCreditProfile(Long creditProfileId, Long customerId, String customerGrade, Double creditLimit, Double balancePayable, Double creditBalance, Double paymentAsCIA, String creditProfileStatus, int defaults, List<String> methodOfPayment, String accountNumber, String bankName, String creditCardType, String creditCardNumber);

    public Long deleteCreditProfile(Long creditProfileId);

    public List<CreditProfileState> viewCreditProfile();

    public List<CreditProfileState> viewDeletedCreditProfile();

    public boolean overallCreditCheck(Long customerId, Long salesOrderId);
    
    public void updateCustomerGrade(Long customerId, String grade);

    public void freezeCreditProfile(Long creditProfileId);

    public void validateCreditProfile(Long creditProfileId);

    public boolean checkAllowedCredit(Long customerId);

    public Double getCreditBalance(Long customerId);

    public int getDefaults(Long customerId);

    public String getCustomerName(Long customerId);

    public void sendResultForCreditCheck(Long salesOrderId, Long customerId, boolean status);

}
